package com.shujiaotong.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2024-10-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
@ApiModel(value="User对象", description="")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "用户姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "联系方式")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "性别")
    @TableField("sex")
    private Integer sex;

    @ApiModelProperty(value = "生日")
    @TableField("birthday")
    private LocalDate birthday;

    @ApiModelProperty(value = "身份证号")
    @TableField("id_number")
    private String idNumber;

    @ApiModelProperty(value = "头像")
    @TableField("image")
    private String image;

    @ApiModelProperty(value = "状态 0:禁用，1:正常")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "类型 学生 老师")
    @TableField("type")
    private String type;

    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField("update_time")
    private LocalDateTime updateTime;

    //创建时间
    @TableField(fill = FieldFill.INSERT ,exist = false)
    private LocalDateTime createTime;
    //创建人
    @TableField(fill = FieldFill.INSERT ,exist = false)
    private Long createUser;
    //修改人
    @TableField(fill = FieldFill.INSERT_UPDATE ,exist = false)
    private Long updateUser;

//    添加一个count字段，不属于数据库
    @TableField(exist = false)
    private Integer count;

    @TableField(exist = false)
    private String className;
}
